-- GENERATED SPELL FOR [Zepik the Gorloc Hunter] --


function spell0_28668(pUnit, Event) --@Bandage,Heal--
pUnit:FullCastSpellOnTarget(52895,pUnit)
pUnit:RegisterEvent('Sorts_28668', 6000, 1)
end

function spell1_28668(pUnit, Event) --@Barbed Net,n/a--
pUnit:FullCastSpellOnTarget(52761,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28668', 6500, 1)
end

function spell2_28668(pUnit, Event) --@Envenomed Shot,n/a--
pUnit:FullCastSpellOnTarget(52889,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28668', 6000, 1)
end

function spell3_28668(pUnit, Event) --@Open Wound,n/a--
pUnit:FullCastSpellOnTarget(52873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28668', 15000, 1)
end

function spell4_28668(pUnit, Event) --@Piercing Arrow,n/a--
pUnit:FullCastSpellOnTarget(52758,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28668', 635, 1)
end

function spell5_28668(pUnit, Event) --@Spike Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(52886,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_28668', 1, 1)
end

function spell6_28668(pUnit, Event) --@Tomb of the Heartless,Self--
pUnit:FullCastSpellOnTarget(52182,pUnit)
pUnit:RegisterEvent('Sorts_28668', 598, 1)
end

function Sorts_28668(pUnit, Event)
local choix_sorts_28668 = math.random(0, 6)
if choix_sorts_28668 == 0 then
pUnit:RegisterEvent('spell0_28668', 1, 1)
end
if choix_sorts_28668 == 1 then
pUnit:RegisterEvent('spell1_28668', 1, 1)
end
if choix_sorts_28668 == 2 then
pUnit:RegisterEvent('spell2_28668', 1, 1)
end
if choix_sorts_28668 == 3 then
pUnit:RegisterEvent('spell3_28668', 1, 1)
end
if choix_sorts_28668 == 4 then
pUnit:RegisterEvent('spell4_28668', 1, 1)
end
if choix_sorts_28668 == 5 then
pUnit:RegisterEvent('spell5_28668', 1, 1)
end
if choix_sorts_28668 == 6 then
pUnit:RegisterEvent('spell6_28668', 1, 1)
end
end

function mob28668_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28668', math.random(1500, 3000), 1)
end

function mob28668_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28668_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28668_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28668, 1, 'mob28668_Action')
RegisterUnitEvent(28668, 2, 'mob28668_Leave')
RegisterUnitEvent(28668, 3, 'mob28668_Kill')
RegisterUnitEvent(28668, 4, 'mob28668_Die')
